﻿using System;
using System.Windows.Forms;

namespace System.Windows.Forms
{
    /// <summary>
    ///  <see cref="ListViewItem"/> with additional property to store object.
    /// </summary>
    public class ListViewItemExtraContent:ListViewItem
    {
        /// <summary>
        ///  Extra value
        /// </summary>
        private object value;


        /// <summary>
        ///  Gets or sets stored object.
        /// </summary>
        public object Value
        {
            get { return value; }
            set { this.value = value; }
        }

        /// <summary>
        ///  Creates new instance of ListViewExtraContent that displays given text.
        /// </summary>
        /// <param name="text"> Text to display </param>
        public ListViewItemExtraContent(string text) : base(text) { }


        /// <summary>
        ///  Creates new instance of ListViewExtraContent that displays given text and stores given value.
        /// </summary>
        /// <param name="text"> Text to display </param>
        /// <param name="value"> Value to store </param>
        public ListViewItemExtraContent(string text, object value)
            : base(text)
        {
            this.value = value;
        }
    }
}
